#!/bin/bash

pid=$(ps -ef | grep "/home/zuo/26_DocumentDelivery/Task/TransitiveRun.py" | grep -v grep | awk '{print $2}')
if [ -n "$pid" ]; then
    echo "杀死进程 ID: $pid"
    kill -9 $pid
else
    echo "No process found for To_RedisLocal.py"
fi

nohup python3 -u /home/zuo/26_DocumentDelivery/Task/TransitiveRun.py > /home/zuo/26_DocumentDelivery/Task/TransitiveRun.log &


if [ $? -eq 0 ]; then
    echo "TransitiveRun.py 重启成功"
else
    echo "TransitiveRun.py 重启失败"
fi

# 0 8 * * * * /home/zuo/26_DocumentDelivery/TransitiveRun.sh